package com.yc.springcloudindex.web.feign;


import com.yc.springcloudindex.bean.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

//@FeignClient(name = "服务名") yml文件下定义的文件名
@FeignClient("spring-cloud-order")
public interface OrderAction {

    @RequestMapping("order")
    String order();


    @RequestMapping("hello1")
    String hello(@RequestParam("name") String name);


    @RequestMapping("hello2/{name}")
    String hello1(@PathVariable("name") String name);



    @RequestMapping("showMe")
    User showMe(@RequestBody User user,@RequestParam String newName);


}
